home *** CD-ROM | disk | FTP | other *** search
- class classes.misc.Coins
- {
- var clip;
- var alpha = 0;
- var num = 0;
- var numT = 0;
- var Name = "coins";
- function Coins()
- {
- this.clip = _root.attachMovie("coins","coinsClip",200100);
- this.clip._x = 18;
- this.clip._y = 566;
- this.clip._alpha = 0;
- }
- function addTo(pnumT)
- {
- this.numT += pnumT;
- _root.stats.coins += pnumT;
- if(pnumT > 0)
- {
- _root.stats.totalCoins += pnumT;
- }
- this.alpha = 130;
- }
- function main()
- {
- this.clip._alpha = this.alpha;
- if(this.num < this.numT)
- {
- this.num = this.num + 1;
- this.clip.num = this.num;
- this.alpha = 100;
- }
- else if(this.num > this.numT)
- {
- this.num = this.num - 1;
- this.clip.num = this.num;
- this.alpha = 100;
- }
- this.alpha -= 2;
- if(this.alpha < 0)
- {
- this.alpha = 0;
- }
- }
- }
-